const { defineConfig } = require('@vue/cli-service')
const { VantResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');
module.exports = defineConfig({
  transpileDependencies: true,
  // 在开发环境中是否对代码进行eslint校验
  lintOnSave:false,
  publicPath:'./',
  devServer:{
    host:'192.168.2.8',
    port:8080,
    // 自动打开浏览器
    open:true,
    proxy:{
      // 代理的标识
      "/api":{
          target:"http://localhost:3000",
          // 是否跨域
          changeOrigin:true,
      }
    }

  },
  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()],
      }),
    ],
  },


})